﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="View.aspx.cs" Inherits="View" Title="View All Issues" %>


<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><br />
   <p><asp:Label ID="Label1" runat="server" Text="View All Issues" 
           
           style="font-family: Georgia; font-size: large; font-weight: 700; color: #0066FF"></asp:Label></p>
    <asp:Label ID="lblMessage" runat="server" EnableViewState="False"></asp:Label>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" 
        DataSourceID="sdsIssue" BackColor="White" BorderColor="#660066" 
        BorderStyle="Solid" BorderWidth="1px" CellPadding="6" 
        GridLines="Horizontal" 
        onselectedindexchanged="GridView1_SelectedIndexChanged" 
        DataKeyNames="Issue_Id">
        <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
        <Columns>
            <asp:CommandField SelectText="[Details]" ShowSelectButton="True" />
            <asp:BoundField DataField="Issue_Id" HeaderText="Issue_Id" 
                SortExpression="Issue_Id" />
            <asp:BoundField DataField="Creator" HeaderText="Creator" 
                SortExpression="Creator" />
            <asp:BoundField DataField="Label" HeaderText="Label" 
                SortExpression="Label" />
            <asp:BoundField DataField="Category" HeaderText="Category" 
                SortExpression="Category" />
            <asp:BoundField DataField="Assigned_To" HeaderText="Assigned_To" 
                SortExpression="Assigned_To" />
            <asp:BoundField DataField="Priority" HeaderText="Priority" 
                SortExpression="Priority" />
            <asp:BoundField DataField="Created_On" HeaderText="Created_On" 
                SortExpression="Created_On" DataFormatString="{0:d}" />
            <asp:BoundField DataField="Resolved On" HeaderText="Resolved On" 
                SortExpression="Resolved On" DataFormatString="{0:d}" 
                NullDisplayText="--" />
            <asp:BoundField DataField="status_name" HeaderText="Status" 
                SortExpression="status_name" />
        </Columns>
        <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
        <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
        <EmptyDataTemplate>
            There are no issues in the database. <a href="Create.aspx"><span class="style1">
            Create a new issue.</span></a>
        </EmptyDataTemplate>
        <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
        <AlternatingRowStyle BackColor="#F7F7F7" />
    </asp:GridView>
    <asp:SqlDataSource ID="sdsIssue" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        
        
        
        SelectCommand="SELECT [Issue Id] AS Issue_Id, Creator, Label, Category, [Assigned To] AS Assigned_To, Priority, [Created On] AS Created_On, [Resolved On], status_name FROM vwGetIssues ORDER BY Issue_Id, Priority">
    </asp:SqlDataSource>
</asp:Content>

